<html ng-app="app">
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
	<link href="../../build/common/base.css" rel="stylesheet">
	<script type="text/javascript" src="../../build/common/base.js"></script>
	<script type="text/javascript" src="../../build/common/ngEdit.js"></script>

	<script type="text/javascript">
	var id = $.getParam("id");
	
	var app = angular.module('app', ['baseDirective']);
	app.controller("ctrl", [ '$scope', 'baseService','ArrayToolService', function($scope, baseService,ArrayToolService) {
		$scope.ArrayTool = ArrayToolService;
		$scope.isSaveEd = id;
		if(id){
			$("#account").attr("readonly","readonly");
		}
		
		if($scope.isSaveEd){
		}
		
		/**
		 * 数据初始化。
		 */
		$scope.init=function(){
			if(!$scope.data){
				$scope.data={userId:id};
			}
		};
		
	}]);
	</script>
</head>
<body ng-controller="ctrl" class="panel success">
	<!-- 顶部按钮 -->
	<div class="panel-heading">
		<a class="btn btn-primary fa-save" ng-model="data" use-default-after-save-event="true" ab-save="/org/user/updateCredit"> 确定 </a>
		<a href="javascript:void(0)" class="btn btn-sm btn-primary fa-reply" onclick="javascript:$.Dialog.close(window);"> 取消 </a>
	</div>
	<form name="form" method="post" ab-load="/org/user/get?id={id}"  ng-model="data">
		<table class="form-table" cellspacing="0">
			<tr>
				<th>
					<span>姓名:</span>
				</th>
				<td>{{data.fullname}}
				</td>

			</tr>
			<tr>
					<th>现有积分</th>
					<td>{{data.credit}}</td>
				</tr>
			<tr>
					<th>变化积分</th>
					<td><input type="text" class="form-control"
						ng-model="data.creditChange"
						desc="变化积分" ab-validate="{required:true}" /></td>
				</tr>
			<tr>
					<th>备注</th>
					<td><textArea type="text" class="form-control"
						ng-model="data.remark"
						desc="备注" ab-validate="{required:true}" /></td>
				</tr>
		</table>
	</form>
</body>
</html>